from django.db import models
from django.utils import timezone

# Create your models here.
#车表
class CarMessage(models.Model):
    id = models.AutoField('id',primary_key=True,)
    brandName = models.CharField('品牌',max_length=255)
    seriesName = models.CharField('车名', max_length=255)
    carImg = models.CharField('图片链接', max_length=255)
    sale = models.CharField('销量', max_length=255)
    price = models.CharField('价格', max_length=255)
    manufacture = models.CharField('厂商', max_length=255)
    rank = models.CharField('排名', max_length=255)
    carModel = models.CharField('车型', max_length=255)
    energyType = models.CharField('能源类型', max_length=255)
    marketTime = models.CharField('上市时间', max_length=255)
    inSure = models.CharField('保修期限', max_length=255)
    createTime = models.DateField('创建时间',auto_now_add=True)
    class Meta:
        db_table = 'CarInfo'

#用户
class User(models.Model):
    id = models.AutoField('id',primary_key=True,)
    username = models.CharField('用户名',max_length=255)
    password = models.CharField('密码',max_length=255)
    createTime = models.DateField('创建时间', auto_now_add=True)
    class Meta:
        db_table = 'user'